﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using TestDomainModel;

namespace LightPersistTests
{
	[TestClass]
	public class ModelInitializers : TestsBase
	{
		[TestMethod]
		public void Should_initialize_test_field_from_custom_initializers()
		{
			FakeControl item = null;
			Context.Execute = delegate
			{
				var root = Context.RootClass<FakeRoot>();
				item = root.Children.AddNew();
			};
			Assert.AreEqual(2, item.TestInit);

		}
	}
}
